-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
C++ compiler support v2 #5252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C++ compiler support v2 #5252
Conversation
@sakgoyal Added some review comments, just noticed that most are already listed on the TODO. Please, let me know when ready to merge. Thanks! |
I don't want to update some of the dependencies. Many of them seem to introduce breaking changes that need more work to get working again that feels out of scope for this PR. All workflows passed: |
@sakgoyal added some minor tweaks to review |
There could be another CI action for checking formatting (NOT a commit hook). It would reduce a lot of back and forth. |
@sakgoyal sure! but it needs to be coded! |
Just wondering, why is this preferable to building/linking as C? |
@Peter0x44 > Just wondering, why is this preferable to building/linking as C? I thought the provision of C++ bindings that have been made available as add-ons would be a preferable route. It isolates the language-preference and avoids the clean raylib source being mis-maintained by folks who are less equipped to preserve raylib portability to platforms other than the only one they know. |
Not being your preference of compiler doesn't make supporting it invalid. |
I agree, compiler shouldn't matter so long as portability is maintained. But edits (especially significant ones) not intended to break anything still have to be reviewed. No fun. |
@sakgoyal thanks for the review, it looks good, most of the small tweaks seem related to C code quality following with pointer casting when required. Just note that if external libraries are updated, some of those changes can be overwriten. |
Redoing #5232 because I messed up the force push.
Allow C++ compilers to compile this code without separately linking as a C library.
Changes:
TODO:
jar_*
is ok to update. Managed by raysan5= {0}
-ftrivial-auto-var-init=zero
or something instead